package com.last.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author tom
 * @since 2021-03-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("homestay_order")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId("order_id")
    private String orderId;

    /**
     * 房间主键
     */
    private Integer roomId;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 入住时间
     */
    @JsonFormat(timezone = "GMT+8")
    private Date startDate;

    /**
     * 离店时间
     */
    @JsonFormat(timezone = "GMT+8")
    private Date leaveDate;

    /*
    * 订单价格
    * */
    private BigDecimal orderPrice;
    /**
     * 人数
     */
    private Integer peopleNum;

    /**
     * 订单状态 0未支付 1已支付 2已取消
     */
    private Integer orderStatus;

    /**
     * 下单时间
     */
    @JsonFormat(timezone = "GMT+8")
    private Date orderTime;
    /**
     * 更新时间
     */
    @JsonFormat(timezone = "GMT+8")
    private Date updateTime;

    /**
     * 备注
     */
    private String remark;

    @TableField(exist = false)
    private String roomName;
    @TableField(exist = false)
    private User user;

}
